using Assets.Scripts.GDK;
using UnityEngine;

namespace Brick
{
	public class ShuffleGuide : BaseGuideLayer
	{
		public RectTransform arrow1;

		public RectTransform arrow2;

		public override void OnStart()
		{
			bindItemTouch();
			view.gameObject.SetActive(value: false);
			gdk_runTime.setTimeOut(delegate
			{
				view.gameObject.SetActive(value: true);
				showBtns();
			}, 1f);
		}

		private void showBtns()
		{
			Vector3 localPosition = arrow1.localPosition;
			Vector3 localPosition2 = arrow2.localPosition;
			arrowMove(arrow1, localPosition - new Vector3(50f, 0f, 0f), localPosition);
			arrowMove(arrow2, localPosition2 - new Vector3(-50f, 0f, 0f), localPosition2);
		}

		private void bindItemTouch()
		{
			GameObject gameObject = gdk_game_manager.loadPrefab(GuideID.ALERT);
			gameObject.GetComponent<GuideAlert>().OnData(3, delegate
			{
				UnityEngine.Object.Destroy(base.gameObject, 0.1f);
			});
			gameObject.transform.SetParent(box);
		}

		public void OnChangeBtnClick()
		{
			gdk_game_manager.DispachEvent(EventID.RANDOM_HIDE_SELECT_LIST);
			gdk_game_manager.PlaySound(AudioID.skill_0);
		}

		public void OnTipOneBtnClick()
		{
			UnityEngine.Object.Destroy(base.gameObject, 0.1f);
			gdk_game_manager.PlaySound(AudioID.click);
		}
	}
}

